<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script src="linkedlist.js"></script>
    <script>
        var linkedList = new LinkedList()
        linkedList.append(1)
        linkedList.append(2)
        console.log(linkedList.toString());

        linkedList.insert(0,3)
        linkedList.insert(3,5)
        console.log(linkedList.toString());
        // console.log(linkedList.get(3));
        // console.log(linkedList.removeAt(3));
        // console.log(linkedList.deleteAtIndex(4));
        console.log(linkedList.get(3));


        // console.log(linkedList.indexOf(5)); 

        // 删除
        // linkedList.remove(5);
        // console.log(linkedList.toString());

        // linkedList.update(3,7);
        // console.log(linkedList.toString());

    </script>
</body>
</html>